/*
 * UpdateChecker.java
 *
 * Created on 2 listopad 2007, 10:37
 *
 */

package kosciak.blip4j.automation;

import java.util.List;
import kosciak.blip4j.BlipClient;
import kosciak.blip4j.BlipException;
import kosciak.blip4j.Update;
import kosciak.blip4j.User;

/**
 * <CODE>UserStatusChecker</CODE> checks for User's new Updates.
 * @author Wojtek 'KosciaK' Pietrzok
 * @since 0.1
 */
public class UserUpdateChecke extends Checker{
    
    private User user;
    
    /** 
     * Creates a new instance of UserUpdateChecker.
     * Checks for User's new Updates. 
     * @param client a BlipClient to be used by the Update Checker
     * @param start an Update to start checking from
     * @param interval an interval between checking (in miliseconds)
     * @param user an User whose Updates to check
     */
    public UserUpdateChecke(BlipClient client, int start, long interval, User user) {
         super(client, start, interval);
         this.user = user;
    }

    @Override
    public List<Update> poll() throws BlipException {
        return getBlipClient().pollUser(user, getLast());
    }
    
}
